Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
HorizontalPodAutoscaler | Establecer/Actualizar valor de variable

¿Hay alguna manera de usar HorizontalPodAutoscaler y lograr escalar hacia arriba o hacia abajo y, junto con eso, actualizar un valor (ya sea una variable de Helm como .Values.foo o una variable de entorno dentro del pod en ejecución)?

Antecedentes : estoy buscando una instalación de Postgres de código abierto que tenga la capacidad de escalar. Encontré una buena vez aquí https://github.com/bitnami/charts/tree/master/bitnami/postgresql-ha

Este paquete tiene una forma manual documentada de escalar, con un comando como helm install/upgrade test . --set postgresql.replicaCount=1

Estoy tratando de poner un HorizontalPodAutoscaler a este paquete.

Lea también: https://github.com/bitnami/charts/issues/2931


Resumen de la investigación :

  • Hay una variable de entorno llamada REPMGR_PARTNER_NODES
  • Esto mantiene una lista de réplicas conocidas en formato APP_NAME-postgresql-ha-postgresql-REPLICA_NUM.APP_NAME-postgresql-ha-postgresql-headless.default.svc.cluster.local
  • Esto se completa con templates/postgresql/statefulset.yaml en su sección env
  • La replicación se establecerá en StatefulSet
  • El Statefulset auto crea PVC
  • Podemos verificar la replicación a través kubectl describe statefulset test-postgresql-ha-postgresql | grep Replicas:

Problema :

  • Con un HPA normal como el siguiente código, la variable de entorno de cada pod REPMGR_PARTNER_NODES tiene un valor más antiguo.
 apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: name: "test-hpa" spec: scaleTargetRef: apiVersion: apps/v1 kind: StatefulSet name: "test-postgresql-ha-postgresql" minReplicas: 4 maxReplicas: 5 metrics: - type: Resource resource: name: cpu targetAverageUtilization: 40
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!